/*
 * @Description: Description
 * @Author: Kerwin
 * @Date: 2024-05-16 16:14:22
 * @LastEditTime: 2024-05-17 23:35:48
 * @LastEditors:  Please set LastEditors
 */
import { reactive } from 'vue'
export const rules = reactive({
  stf_email: [
    {
      required: true,
      message: '请输入邮箱',
      trigger: 'change'
    }
  ],
  stf_signType: [
    {
      required: true,
      message: '请选择签约类型',
      trigger: 'change'
    }
  ],
  sft_registerPhone: [
    {
      required: true,
      message: '请输入注册手机号',
      trigger: 'blur'
    },
    {
      pattern: /^1[3-9]\d{9}$/,
      message: '请输入正确的手机号',
      trigger: 'blur'
    }
  ],
  sft_licenseNo: [
    {
      required: true,
      message: '请输入营业执照号',
      trigger: 'blur'
    }
  ],
  sft_licenseExpiryDate: [
    {
      required: true,
      message: '请选择营业执照有效期',
      trigger: 'change'
    }
  ],
  sft_corporationName: [
    {
      required: true,
      message: '请输入法人姓名',
      trigger: 'blur'
    }
  ],
  sft_corporationIdcardNo: [
    {
      required: true,
      message: '请输入法人身份证号',
      trigger: 'blur'
    },
    {
      pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
      message: '请输入正确的身份证号',
      trigger: 'blur'
    }
  ],
  sft_corporationIdcardAddress: [
    {
      required: true,
      message: '请输入法人证件地址',
      trigger: 'blur'
    }
  ],
  sft_corporationIdcardFrontImage: [
    {
      required: false,
      message: '请上传身份证人像面',
      trigger: 'change'
    }
  ],
  sft_corporationIdcardBackImage: [
    {
      required: false,
      message: '请上传身份证背面',
      trigger: 'change'
    }
  ],
  sft_corporationIdcardWithHandImage: [
    {
      required: false,
      message: '请上传手持身份证人像面',
      trigger: 'change'
    }
  ],
  sft_corporationIdcardExpiryDate: [
    {
      required: true,
      message: '请选择证件有效期',
      trigger: 'change'
    }
  ],
  sft_accountType: [
    {
      required: true,
      message: '请选择账户类型',
      trigger: 'change'
    }
  ],
  sft_accountName: [
    {
      required: true,
      message: '请输入公司名称',
      trigger: 'blur'
    }
  ],
  sft_bankcardFrontImage: [
    {
      required: false,
      message: '请上传银行卡正面照',
      trigger: 'change'
    }
  ],
  sft_bankcardNo: [
    {
      required: true,
      message: '请输入银行卡卡号',
      trigger: 'blur'
    }
  ],
  sft_bankcardNoRepeat: [
    {
      required: true,
      message: '请确认银行卡卡号',
      trigger: 'blur'
    }
    // {
    //   validator: (rule: any, value: any, callback: any) => {
    //     if (value !== formData.sft_bankcardNo) {
    //       callback(new Error('两次输入的银行卡卡号不一致'))
    //     } else {
    //       callback()
    //     }
    //   },
    //   trigger: ['change', 'blur']
    // }
  ],
  sft_bankBranch: [
    {
      required: true,
      message: '请输入银行卡开户行',
      trigger: 'blur'
    }
  ],
  sft_accountOpeningCertificate: [
    {
      required: false,
      message: '请上传银行卡开户行证明',
      trigger: 'change'
    }
  ],
  sft_corporatePersonalAccountName: [
    {
      required: true,
      message: '请输入法人个人银行账户名称',
      trigger: 'blur'
    }
  ],
  sft_corporatePersonalAccountNo: [
    {
      required: true,
      message: '请输入法人个人银行账户',
      trigger: 'blur'
    }
  ],
  sft_corporatePersonalAccountFrontImage: [
    {
      required: false,
      message: '请上传法人个人银行账户银行卡人像面',
      trigger: 'change'
    }
  ],
  sft_corporatePersonalAccountBankBranch: [
    {
      required: true,
      message: '请输入法人个人银行账户开户行',
      trigger: 'blur'
    }
  ],
  sft_otherPersonName: [
    {
      required: true,
      message: '请输入持卡人姓名',
      trigger: 'blur'
    }
  ],
  sft_otherPersonIdcardNo: [
    {
      required: true,
      message: '请输入持卡人身份证号',
      trigger: 'blur'
    },
    {
      pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
      message: '请输入正确的身份证号',
      trigger: 'blur'
    }
  ],
  sft_otherPersonIdcardFrontImage: [
    {
      required: false,
      message: '请上传持卡人身份证人像面',
      trigger: 'change'
    }
  ],
  sft_otherPersonIdcardBackImage: [
    {
      required: false,
      message: '请上传持卡人身份证背面',
      trigger: 'change'
    }
  ],
  sft_otherPersonIdcardExpiryDate: [
    {
      required: true,
      message: '请选择持卡人身份证有效期',
      trigger: 'change'
    }
  ],
  sft_otherPersonIdcardBankBranch: [
    {
      required: true,
      message: '请输入持卡人开户行',
      trigger: 'blur'
    }
  ],
  sft_otherPersonAccountName: [
    {
      required: true,
      message: '请输入持卡人银行账户名称',
      trigger: 'blur'
    }
  ],
  sft_otherPersonAccount: [
    {
      required: true,
      message: '请输入持卡人银行账户',
      trigger: 'blur'
    }
  ],
  sft_otherPersonAccountImage: [
    {
      required: false,
      message: '请上传持卡人银行卡照片',
      trigger: 'change'
    }
  ]
})
